home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / qwik5x.zip / QWIKREF.DOC < prev    next >
Text File  |  1988-12-19  |  76KB  |  1,689 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                               QWIK SCREEN UTILITIES
  21.                                  REFERENCE GUIDE
  22.  
  23.                                    Version 5.x
  24.                                 December 20, 1988
  25.  
  26.  
  27.                   Copyright (C) 1988 Eagle Performance Software
  28.                               All Rights Reserved.
  29.  
  30.  
  31.  
  32.                                _______                     
  33.                           ____|__     |               (tm) 
  34.                        --|       |    |------------------- 
  35.                          |   ____|__  |  Association of    
  36.                          |  |       |_|  Shareware         
  37.                          |__|   o   |    Professionals     
  38.                        -----|   |   |--------------------- 
  39.                             |___|___|    MEMBER            
  40.  
  41.  
  42.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  43.  
  44.  
  45.  
  46.                        T A B L E   O F   C O N T E N T S
  47.  
  48.         1. INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . 4
  49.              Purpose . . . . . . . . . . . . . . . . . . . . . . . 4
  50.              Common Parameters . . . . . . . . . . . . . . . . . . 4
  51.              Attributes  . . . . . . . . . . . . . . . . . . . . . 5
  52.  
  53.         2. PROCEDURES AND FUNCTIONS  . . . . . . . . . . . . . . . 7
  54.              EosC  . . . . . . . . . . . . . . . . . . . . . . . . 7
  55.              EosLn . . . . . . . . . . . . . . . . . . . . . . . . 7
  56.              EosR  . . . . . . . . . . . . . . . . . . . . . . . . 7
  57.              EosToCursor . . . . . . . . . . . . . . . . . . . . . 7
  58.              EosToRC . . . . . . . . . . . . . . . . . . . . . . . 7
  59.              EosToRCrel  . . . . . . . . . . . . . . . . . . . . . 8
  60.              GetCursor . . . . . . . . . . . . . . . . . . . . . . 8
  61.              GetSubModelID . . . . . . . . . . . . . . . . . . . . 8
  62.              GotoEos . . . . . . . . . . . . . . . . . . . . . . . 8
  63.              GotoRC. . . . . . . . . . . . . . . . . . . . . . . . 9
  64.              ModCursor . . . . . . . . . . . . . . . . . . . . . . 9
  65.              Qattr . . . . . . . . . . . . . . . . . . . . . . . . 9
  66.              QattrC  . . . . . . . . . . . . . . . . . . . . . . . 10
  67.              QattrEos  . . . . . . . . . . . . . . . . . . . . . . 10
  68.              QEosLn  . . . . . . . . . . . . . . . . . . . . . . . 10
  69.              Qfill . . . . . . . . . . . . . . . . . . . . . . . . 11
  70.              QfillC  . . . . . . . . . . . . . . . . . . . . . . . 11
  71.              QfillEos  . . . . . . . . . . . . . . . . . . . . . . 11
  72.              Qinit . . . . . . . . . . . . . . . . . . . . . . . . 12
  73.              QreadAttr . . . . . . . . . . . . . . . . . . . . . . 12
  74.              QreadChar . . . . . . . . . . . . . . . . . . . . . . 12
  75.              QreadStr  . . . . . . . . . . . . . . . . . . . . . . 12
  76.              QscrollDown . . . . . . . . . . . . . . . . . . . . . 13
  77.              QscrollUp . . . . . . . . . . . . . . . . . . . . . . 13
  78.              QScrToVscr  . . . . . . . . . . . . . . . . . . . . . 13
  79.              QstoreToMem . . . . . . . . . . . . . . . . . . . . . 14
  80.              QstoreToScr . . . . . . . . . . . . . . . . . . . . . 15
  81.              QviewPage . . . . . . . . . . . . . . . . . . . . . . 16
  82.              QVscrToScr  . . . . . . . . . . . . . . . . . . . . . 16
  83.              Qwrite  . . . . . . . . . . . . . . . . . . . . . . . 17
  84.              QwriteA . . . . . . . . . . . . . . . . . . . . . . . 17
  85.              QwriteC . . . . . . . . . . . . . . . . . . . . . . . 18
  86.              QwriteEos . . . . . . . . . . . . . . . . . . . . . . 18
  87.              QwriteEosA  . . . . . . . . . . . . . . . . . . . . . 19
  88.              QwritePage  . . . . . . . . . . . . . . . . . . . . . 19
  89.              SetCursor . . . . . . . . . . . . . . . . . . . . . . 19
  90.              StrL  . . . . . . . . . . . . . . . . . . . . . . . . 20
  91.              StrLF . . . . . . . . . . . . . . . . . . . . . . . . 20
  92.              StrR  . . . . . . . . . . . . . . . . . . . . . . . . 21
  93.              StrRF . . . . . . . . . . . . . . . . . . . . . . . . 21
  94.              StrRFD  . . . . . . . . . . . . . . . . . . . . . . . 21
  95.              WhereC  . . . . . . . . . . . . . . . . . . . . . . . 22
  96.              WhereR  . . . . . . . . . . . . . . . . . . . . . . . 22
  97.  
  98.  
  99.  
  100.  
  101.  
  102.                                        2
  103.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  104.  
  105.  
  106.         3. VARIABLES . . . . . . . . . . . . . . . . . . . . . . . 23
  107.              System Hardware . . . . . . . . . . . . . . . . . . . 23
  108.              Video Hardware  . . . . . . . . . . . . . . . . . . . 24
  109.              Video Software  . . . . . . . . . . . . . . . . . . . 26
  110.              Video Cursor  . . . . . . . . . . . . . . . . . . . . 28
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.                                        3
  164.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  165.  
  166.  
  167.    1.  I N T R O D U C T I O N
  168.  
  169.  
  170.    PURPOSE
  171.  
  172.    This document is a QWIK technical reference manual describing each routine 
  173.    and variable in detail in a format similar to the TP manual.  The routines 
  174.    are described in alphabetical order.  Since this manual is on disk, you can 
  175.    find your interest easily with a search utility.
  176.  
  177.    Application - All QWIK procedures will perform in the following 
  178.    applications:
  179.  
  180.      . All video text modes - 0, 1, 2, 3 and 7.
  181.      . Any column mode - 40, 80, or variable.
  182.      . For IBM PC, XT, AT, PCjr, PC convertible, all PS/2 models, 3270 PC, and 
  183.        compatibles.
  184.      . With MDA, CGA, EGA, MCGA, VGA, 8214/A, all Hercules video cards.
  185.      . Perform routines in absolute coordinates rather than window-relative 
  186.        coordinates.
  187.  
  188.    For window-relative writing routines, see WNDW5X.ARC.
  189.  
  190.  
  191.    COMMON PARAMETERS
  192.  
  193.    Common Parameters - Most procedures use the same parameters.  Rather than 
  194.    repeating them for each routine, detailed descriptions for those parameters 
  195.    are listed below.
  196.  
  197.    Screen Coordinates - QWIK routines work in absolute coordinates to give you 
  198.    full control of the screen.  The routines do not check for bounds on the 
  199.    screen, so be sure to stay in range.  The upper left column on the screen 
  200.    is row 1, column 1, which is also called 1-based.  The routines also wrap 
  201.    to the next line; they do not truncate at EOL.  For example, Row:=1 and 
  202.    Col:=255 is equivalent to Row:=3 and Col:=15 on a screen with 80 columns.  
  203.    But this is not a recommended practice for variable screen widths.
  204.  
  205.    Row/Col - Row and Col were chosen in lieu of the X/Y scheme used in TP.  
  206.    Since QWIK is for only text modes, the screen is treated like a word 
  207.    processor with rows and columns.  It is more intuitive to use the X/Y 
  208.    scheme in graphics and the Row/Col scheme for text.
  209.  
  210.    ColL/ColR - In the self-centering routines, the left and right columns are 
  211.    simply averaged.  To center on the full width of an 80 column display, set 
  212.    ColL:=1 and ColR:=80.  To center on a certain column number, set both 
  213.    values equal to that column number.  Or, to center on any screen, set 
  214.    ColL:=1 and ColR:=CRTcols.
  215.  
  216.    Rows/Cols - Using Rows/Cols is much easier than Row2/Col2 to describe the 
  217.    height and width of a block such as:
  218.  
  219.       QstoreToMem (Row,Col,Rows,Cols,MyPtr^);
  220.  
  221.    Should you decide to move a block, only Row and Col need to be changed, and 
  222.  
  223.  
  224.    Chapter 1, Introduction                                             Page 4
  225.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  226.  
  227.  
  228.    therefore Rows and Cols don't need to be mentally recalculated and altered.  
  229.    Please keep Cols limited to one row.  Zero values will simply exit the 
  230.    routine.
  231.  
  232.    aStr - One of the nice improvements since TP 4.0 is that the address of the 
  233.    string, aStr, is always passed onto to the stack no matter if it's a string 
  234.    value or a variable.  So, internally, QWIK does not need to copy strings to 
  235.    the stack and thereby increasing speed.  The Qwrite* procedures use this 
  236.    address even if hard-coded strings are passed as a parameter.
  237.  
  238.  
  239.    ATTRIBUTES
  240.  
  241.    Attr - Use the convenient attribute constants for the foreground  and 
  242.    background colors supplied in the unit rather than having to use TP 
  243.    functions or procedures to get a desired color, for example:
  244.     
  245.      Qwrite ( 1, 1,White+BlueBG,'My String');
  246.  
  247.    will write the text with white on blue attributes.  Of course, you can 
  248.    still use Turbo's TextColor and TextBackground procedures, and then use 
  249.    TextAttr as a parameter.  The foreground constants are duplicates of those 
  250.    in TP4:
  251.  
  252.      Black        = $00;       DarkGray     = $08;
  253.      Blue         = $01;       LightBlue    = $09;
  254.      Green        = $02;       LightGreen   = $0A;
  255.      Cyan         = $03;       LightCyan    = $0B;
  256.      Red          = $04;       LightRed     = $0C;
  257.      Magenta      = $05;       LightMagenta = $0D;
  258.      Brown        = $06;       Yellow       = $0E;
  259.      LightGray    = $07;       White        = $0F;
  260.      Blink        = $80;                          
  261.  
  262.    For convenience, background color constants were included to take advantage 
  263.    of constant folding.
  264.  
  265.      BlackBG      = $00;    
  266.      BlueBG       = $10;    
  267.      GreenBG      = $20;    
  268.      CyanBG       = $30;    
  269.      RedBG        = $40;    
  270.      MagentaBG    = $50;    
  271.      BrownBG      = $60;    
  272.      LightGrayBG  = $70;    
  273.      SameAttr     =  -1;  
  274.  
  275.    SameAttr - A powerful and unique feature of all QWIK routines is the use of 
  276.    the constant SameAttr.  If SameAttr, or a negative value, is used as an 
  277.    attribute, the routine will suppress any changes to the attributes and use 
  278.    what is currently on the screen.
  279.  
  280.    3270 PC Attributes - Be aware that the 3270 PC ignores the foreground 
  281.    intensity bit, so there are only 8 colors.  In addition, 4 colors have 
  282.    different tints:
  283.  
  284.  
  285.    Chapter 1, Introduction                                             Page 5
  286.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  287.  
  288.  
  289.  
  290.      PC Color     3270 PC Color
  291.      ------------ -------------
  292.      Cyan         Turquoise
  293.      Magenta      Pink
  294.      Brown        Yellow
  295.      Light Gray   White
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.    Chapter 1, Introduction                                             Page 6
  347.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  348.  
  349.  
  350.    2.  P R O C E D U R E S   A N D   F U N C T I O N S
  351.  
  352.    In this section, a detailed description is provided for each procedure and 
  353.    function.
  354.  
  355.  
  356.    ---------------------------------------------------------------------------
  357.    EosC function                                                          Qwik
  358.    ---------------------------------------------------------------------------
  359.    Function       Returns the absolute column of the EOS marker.
  360.    Declaration    EosC
  361.    Result type    byte
  362.    Screens        All video pages and virtual screens.
  363.    Remarks        Operates on the currently written screen.  The upper left 
  364.                   corner of the screen (1,1). 
  365.    See also       EosR, EosToRC, EosToRCrel, EosToCursor, EosLn, GotoEos
  366.  
  367.    ---------------------------------------------------------------------------
  368.    EosLn procedure                                                        Qwik
  369.    ---------------------------------------------------------------------------
  370.    Function       Moves the EOS marker to column 1 of the next row.
  371.    Declaration    EosLn
  372.    Screens        All video pages and virtual screens.
  373.    Remarks        Operates on the currently written screen.
  374.    EOS            Updated.
  375.    Restrictions   EosLn can increment past the last row of a screen, but does 
  376.                   not scroll up the screen.
  377.    See also       EosR, EosC, EosToRC, EosToRCrel, EosToCursor, GotoEos, 
  378.                   QEosLn
  379.  
  380.    ---------------------------------------------------------------------------
  381.    EosR function                                                          Qwik
  382.    ---------------------------------------------------------------------------
  383.    Function       Returns the absolute row of the EOS marker.
  384.    Declaration    EosR
  385.    Result type    byte
  386.    Screens        All video pages and virtual screens.
  387.    Remarks        Operates on the currently written screen.
  388.    See also       EosC, EosToRC, EosToRCrel, EosToCursor, EosLn, GotoEos
  389.  
  390.    ---------------------------------------------------------------------------
  391.    EosToCursor procedure                                                  Qwik
  392.    ---------------------------------------------------------------------------
  393.    Function       Positions the EOS marker to where the cursor is.
  394.    Declaration    EosToCursor
  395.    Screens        All video pages only.
  396.    Remarks        The EOS marker is simply moved to match the position of the 
  397.                   cursor of the currently written video page.
  398.    EOS            Updated.
  399.    See also       EosR, EosC, EosToRC, EosToRCrel, EosLn, GotoEos
  400.  
  401.    ---------------------------------------------------------------------------
  402.    EosToRC procedure                                                      Qwik
  403.    ---------------------------------------------------------------------------
  404.    Function       Positions the EOS marker.
  405.  
  406.  
  407.    Chapter 2, Procedures and Functions                                 Page 7
  408.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  409.  
  410.  
  411.    Declaration    EosToRC (Row, Col: byte)
  412.    Screens        All video pages and virtual screens.
  413.    Remarks        Use this procedure to manually locate the EOS marker.  The 
  414.                   Q*Eos procedures will write where this marker is located on 
  415.                   the currently written screen.
  416.    EOS            Updated.
  417.    Restrictions   Stay within the screen limits.
  418.    See also       EosR, EosC, EosToRCrel, EosToCursor, EosLn, GotoEos
  419.  
  420.    ---------------------------------------------------------------------------
  421.    EosToRCrel procedure                                                   Qwik
  422.    ---------------------------------------------------------------------------
  423.    Function       Positions the EOS marker relative to its current position.
  424.    Declaration    EosToRCrel (Row, Col: integer)
  425.    Screens        All video pages and virtual screens.
  426.    Remarks        The relative values can be positive or negative.  The Q*Eos 
  427.                   procedures will write where the EOS marker is located on the 
  428.                   currently written screen.  
  429.    EOS            Updated.
  430.    Restrictions   Stay within the screen limits.
  431.    See also       EosR, EosC, EosToRC, EosToCursor, EosLn, GotoEos
  432.  
  433.    ---------------------------------------------------------------------------
  434.    GetCursor function                                                     Qwik
  435.    ---------------------------------------------------------------------------
  436.    Function       Returns the cursor mode for the CRT.
  437.    Declaration    GetCursor
  438.    Result type    word
  439.    Screens        All video pages only.
  440.    Remarks        There is only one cursor mode variable that applies to what 
  441.                   is currently viewed on the CRT and it is retrieved from low 
  442.                   memory at $0040:$0060.
  443.    See also       SetCursor, ModCursor
  444.  
  445.    ---------------------------------------------------------------------------
  446.    GetSubModelID procedure                                                Qwik
  447.    ---------------------------------------------------------------------------
  448.    Function       Gets the SubModelID on IBM computers.
  449.    Declaration    GetSubModelID
  450.    Remarks        The SystemID and SubModelID variables are updated if a 
  451.                   SubModelID exists.  It will only execute on recent models of 
  452.                   XT, AT, and PS/2 models which have this ID.  Otherwise the 
  453.                   variables will remain unaltered as set by Qinit.  
  454.    Restrictions   PC or XT clones must recognize IBM's SystemID.
  455.    See also       QWIK5X.DOC
  456.  
  457.    ---------------------------------------------------------------------------
  458.    GotoEos procedure                                                      Qwik
  459.    ---------------------------------------------------------------------------
  460.    Function       Positions the cursor where the EOS marker is.
  461.    Declaration    GotoEos
  462.    Screens        All video pages only.
  463.    Remarks        The cursor is simply moved to match the position of the EOS 
  464.                   marker of the currently written video page. 
  465.    EOS            Unaltered.
  466.  
  467.  
  468.    Chapter 2, Procedures and Functions                                 Page 8
  469.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  470.  
  471.  
  472.    See also       EosR, EosC, EosToRC, EosToRCrel, EosToCursor, EosLn, GotoRC
  473.    Example        Center a string on the screen and place the cursor at the 
  474.                   end of the string:
  475.  
  476.                     QwriteC (1,1,CRTcols,SameAttr,'My message ');
  477.                     GotoEos;
  478.  
  479.    ---------------------------------------------------------------------------
  480.    GotoRC procedure                                                       Qwik
  481.    ---------------------------------------------------------------------------
  482.    Function       Positions the cursor.
  483.    Declaration    GotoRC (Row, Col: byte)
  484.    Screens        All video pages only.
  485.    Remarks        The cursor is moved to the position absolute to the 
  486.                   currently written video page.
  487.    EOS            Unaltered.
  488.    Restrictions   Stay within the screen limits.
  489.    See also       GotoEos, WhereR, WhereC 
  490.  
  491.    ---------------------------------------------------------------------------
  492.    ModCursor procedure                                                    Qwik
  493.    ---------------------------------------------------------------------------
  494.    Function       Modifies the current cursor mode to turn on, off, or blink 
  495.                   erratically.
  496.    Declaration    ModCursor (Bits13_14: word)
  497.    Screens        Any video page as viewed.
  498.    Remarks        Using the modification constants CursorOn, CursorOff, or 
  499.                   CursorBlink for Bits13_14, the currently viewed cursor mode 
  500.                   on the CRT will be modified accordingly.  The procedure only 
  501.                   looks at bits 13 and 14 of Bits13_14 for the modification.  
  502.                   The scan lines remain unaltered.
  503.    See also       GetCursor, SetCursor
  504.    Example        To turn the current cursor mode off:
  505.  
  506.                     ModCursor (CursorOff);
  507.  
  508.    ---------------------------------------------------------------------------
  509.    Qattr procedure                                                        Qwik
  510.    ---------------------------------------------------------------------------
  511.    Function       Changes just the attribute in a rows-by-columns block on the 
  512.                   screen.
  513.    Declaration    Qattr (Row,Col,Rows,Cols: byte; Attr: integer)
  514.    Screens        All video pages and virtual screens.
  515.    Remarks        The upper left corner of the block starts at (Row,Col) and 
  516.                   the block size is Rows by Cols.  Note that you can even 
  517.                   change 1 row and/or 1 column.  If SameAttr is used for Attr 
  518.                   or if Rows or Cols is zero, then nothing is written.
  519.    EOS            Updated.
  520.    Restrictions   Stay within the screen limits.
  521.    See also       QattrC, QattrEos
  522.    Example        To create inverse video on any screen:
  523.  
  524.                     Qattr (1,1,CRTrows,CRTcols,Black+LightGrayBG);
  525.  
  526.  
  527.  
  528.  
  529.    Chapter 2, Procedures and Functions                                 Page 9
  530.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  531.  
  532.  
  533.    ---------------------------------------------------------------------------
  534.    QattrC procedure                                                       Qwik
  535.    ---------------------------------------------------------------------------
  536.    Function       Changes just the attribute in a rows-by-columns block on the 
  537.                   screen and centers it between two columns.
  538.    Declaration    QattrC (Row,ColL,ColR,Rows,Cols: byte; Attr: integer)
  539.    Screens        All video pages and virtual screens.
  540.    Remarks        The upper left corner of the block starts at 
  541.                   (Row,(ColL+ColR-Cols+1) shr 1) with a block size of Rows by 
  542.                   Cols and centering it between the two columns ColL and ColR.  
  543.                   Odd counts are shifted left.  If SameAttr is used for Attr 
  544.                   or if Rows or Cols is zero, then nothing is written. 
  545.    EOS            Updated.
  546.    Restrictions   Stay within the screen limits.
  547.    See also       Qattr, QattrEos
  548.    Example        A 30 character message centered on the screen in row 15, 
  549.                   needs to be white on green:
  550.  
  551.                     QattrC (15,1,CRTcols,1,30,White+GreenBG);
  552.  
  553.                   The attribute will start to be changed in column 26 on an 80 
  554.                   column screen.
  555.  
  556.    ---------------------------------------------------------------------------
  557.    QattrEos procedure                                                     Qwik
  558.    ---------------------------------------------------------------------------
  559.    Function       Changes just the attribute in a rows-by-columns block on the 
  560.                   current screen starting at the EOS marker.
  561.    Declaration    QattrEos (Rows,Cols: byte; Attr: integer)
  562.    Screens        All video pages and virtual screens.
  563.    Remarks        The upper left corner of the block starts at the previously 
  564.                   set EOS marker and the block size is Rows by Cols.  If 
  565.                   SameAttr is used for Attr or if Rows or Cols is zero, then 
  566.                   nothing is written. 
  567.    Restrictions   Stay within the screen limits.
  568.    EOS            Updated.
  569.    See also       Qattr, QattrC
  570.    Example        To highlight a 20 column data entry field at the EOS marker 
  571.                   with yellow on magenta:
  572.  
  573.                     QattrEos (1,20,Yellow+MagentaBG);
  574.  
  575.    ---------------------------------------------------------------------------
  576.    QEosLn procedure                                                       Qwik
  577.    ---------------------------------------------------------------------------
  578.    Function       Moves the EOS marker to column 1 of the next row with a 
  579.                   possible scroll up.
  580.    Declaration    QEosLn
  581.    Screens        All video pages and virtual screens.
  582.    Remarks        Operates on the currently written screen.  If EosR becomes 
  583.                   greater than CRTrows, then the screen will scroll up.  The 
  584.                   new blank row will have the attribute set by ScrollAttr 
  585.                   which must be manually set before hand.
  586.    EOS            Updated to first cleared column of the cleared row.
  587.    See also       EosR, EosC, EosToRC, EosToRCrel, EosToCursor, GotoEos, EosLn
  588.  
  589.  
  590.    Chapter 2, Procedures and Functions                                 Page 10
  591.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  592.  
  593.  
  594.  
  595.    ---------------------------------------------------------------------------
  596.    Qfill procedure                                                        Qwik
  597.    ---------------------------------------------------------------------------
  598.    Function       Fills the screen with a character with an optional attribute 
  599.                   change in a rows-by-columns block on the current screen.
  600.    Declaration    Qfill (Row,Col,Rows,Cols: byte; Attr: integer; Ch: char)
  601.    Screens        All video pages and virtual screens.
  602.    Remarks        The upper left corner of the block starts at (Row,Col) and 
  603.                   the block size is Rows by Cols.  If SameAttr is used for 
  604.                   Attr, then the attribute will remain the same on the screen.  
  605.                   If Rows or Cols is zero, then nothing is written.
  606.    EOS            Updated.
  607.    Restrictions   Stay within the screen limits.
  608.    See also       QfillC, QfillEos
  609.    Example        To clear the screen with black on brown attribute:
  610.  
  611.                     Qfill (1,1,CRTrows,CRTcols,Black+BrownBG,' ');
  612.  
  613.    ---------------------------------------------------------------------------
  614.    QfillC procedure                                                       Qwik
  615.    ---------------------------------------------------------------------------
  616.    Function       Fills the screen with a character and an optional attribute 
  617.                   change in a rows-by-columns block on the current screen and 
  618.                   centers it between two columns.
  619.    Declaration    QfillC (Row,ColL,ColR,Rows,Cols: byte; 
  620.                           Attr: integer; Ch: char)
  621.    Screens        All video pages and virtual screens.
  622.    Remarks        The upper left corner of the block starts at 
  623.                   (Row,(ColL+ColR-Cols+1) shr 1) with a block size of Rows by 
  624.                   Cols and centered between the two columns ColL and ColR.  
  625.                   Odd counts are shifted left.  If SameAttr is used for Attr, 
  626.                   then the attribute will remain the same on the screen.  If 
  627.                   Rows or Cols is zero, then nothing is written.
  628.    EOS            Updated.
  629.    Restrictions   Stay within the screen limits.
  630.    See also       Qfill, QfillEos
  631.    Example        Center 20 dashes on the screen in rows 1 to 5 with black on 
  632.                   brown attributes:
  633.  
  634.                     QfillC (1,1,CRTcols,5,20,Black+BrownBG,'-');
  635.  
  636.    ---------------------------------------------------------------------------
  637.    QfillEos procedure                                                     Qwik
  638.    ---------------------------------------------------------------------------
  639.    Function       Fills the screen with a character with an optional attribute 
  640.                   change in a rows-by-columns block on the current screen 
  641.                   starting at the Eos marker.
  642.    Declaration    QfillEos (Rows,Cols: byte; Attr: integer; Ch: char)
  643.    Screens        All video pages and virtual screens.
  644.    Remarks        The upper left corner of the block starts at the previously 
  645.                   set EOS marker and the block size is Rows by Cols.  If 
  646.                   SameAttr is used for Attr, then the attribute will remain 
  647.                   the same on the screen.  If Rows or Cols is zero, then 
  648.                   nothing is written.
  649.  
  650.  
  651.    Chapter 2, Procedures and Functions                                 Page 11
  652.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  653.  
  654.  
  655.    EOS            Updated.
  656.    Restrictions   Stay within the screen limits.
  657.    See also       Qfill, QfillC
  658.    Example        To clear a 20 column data entry field at the EOS marker with 
  659.                   yellow on magenta:
  660.  
  661.                     QfillEos (1,20,Yellow+MagentaBG,' ');
  662.  
  663.    ---------------------------------------------------------------------------
  664.    Qinit procedure                                                        Qwik
  665.    ---------------------------------------------------------------------------
  666.    Function       Detects system, display, and video card(s).  Initializes 
  667.                   global data for QWIK routines.
  668.    Declaration    Qinit
  669.    Remarks        Qinit is executed at startup.  Qinit only needs to be run 
  670.                   again if there is a text mode change.
  671.    EOS            Set to (1,1).
  672.    See also       QWIK5X.DOC, QINITEST.PAS, VARIABLES section below.
  673.  
  674.    ---------------------------------------------------------------------------
  675.    QreadAttr function                                                     Qwik
  676.    ---------------------------------------------------------------------------
  677.    Function       Reads an attribute from the current screen.
  678.    Declaration    QreadAttr (Row, Col: byte)
  679.    Result type    byte
  680.    Screens        All video pages and virtual screens.
  681.    Remarks        Reads an attribute from the screen at just one location. 
  682.    EOS            Unaltered.
  683.    See also       QreadChar, QreadStr 
  684.  
  685.    ---------------------------------------------------------------------------
  686.    QreadChar function                                                     Qwik
  687.    ---------------------------------------------------------------------------
  688.    Function       Reads a character from the current screen.
  689.    Declaration    QreadChar (Row, Col: byte)
  690.    Result type    byte
  691.    Screens        All video pages and virtual screens.
  692.    Remarks        Reads a character from the screen at just one location. 
  693.    EOS            Unaltered.
  694.    See also       QreadAttr, QreadStr 
  695.  
  696.    ---------------------------------------------------------------------------
  697.    QreadStr function                                                      Qwik
  698.    ---------------------------------------------------------------------------
  699.    Function       Reads a text string from the current screen.
  700.    Declaration    QreadStr (Row,Col,Cols: byte)
  701.    Result type    string
  702.    Screens        All video pages and virtual screens.
  703.    Remarks        Reads a string of characters from the screen.
  704.    EOS            Unaltered.
  705.    See also       QreadAttr, QreadChar
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.    Chapter 2, Procedures and Functions                                 Page 12
  713.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  714.  
  715.  
  716.    ---------------------------------------------------------------------------
  717.    QscrollDown procedure                                                  Qwik
  718.    ---------------------------------------------------------------------------
  719.    Function       Scrolls a rows-by-columns block down on the current screen 
  720.                   and clears the top row of the block.
  721.    Declaration    QscrollDown (Row,Col,Rows,Cols: byte; BlankAttr: integer)
  722.    Screens        All video pages and virtual screens.
  723.    Remarks        To keep it simple, the block encompasses all affected rows 
  724.                   including the row to be cleared.  The upper left corner of 
  725.                   the block starts at (Row,Col) and the block size is Rows by 
  726.                   Cols.  The bottom row will be scrolled out and lost while 
  727.                   the top row will be cleared with the attribute of BlankAttr 
  728.                   (SameAttr is permitted).  Note that you can even change 1 
  729.                   row and/or 1 column.  The cursor is not moved, but is ready 
  730.                   to be moved with GotoEos.  The CpuID lets the routine choose 
  731.                   the best speed.
  732.    EOS            Updated to first cleared column of the cleared row.
  733.    Restrictions   Stay within the screen limits.
  734.    See also       QscrollUp, GotoEos
  735.    Example        To scroll down the entire screen and clear the top row with 
  736.                   light cyan on blue:
  737.  
  738.                     QscrollDown (1,1,CRTrows,CRTcols,LightCyan+BlueBG);
  739.  
  740.  
  741.    ---------------------------------------------------------------------------
  742.    QscrollUp procedure                                                    Qwik
  743.    ---------------------------------------------------------------------------
  744.    Function       Scrolls a rows-by-columns block up on the current screen and 
  745.                   clears the bottom row of the block.
  746.    Declaration    QscrollUp (Row,Col,Rows,Cols: byte; BlankAttr: integer)
  747.    Screens        All video pages and virtual screens.
  748.    Remarks        To keep it simple, the block encompasses all affected rows 
  749.                   including the row to be cleared.  The upper left corner of 
  750.                   the block starts at (Row,Col) and the block size is Rows by 
  751.                   Cols.  The first row will be scrolled out and lost while the 
  752.                   last row will be cleared with the attribute of BlankAttr 
  753.                   (SameAttr is permitted).  Note that you can even change 1 
  754.                   row and/or 1 column.  The cursor is not moved, but is ready 
  755.                   to be moved with GotoEos.  The CpuID lets the routine choose 
  756.                   the best speed. 
  757.    EOS            Updated to first cleared column of the cleared row.
  758.    Restrictions   Stay within the screen limits.
  759.    See also       QscrollDown, GotoEos
  760.    Example        To scroll up the entire screen and clear the last row with 
  761.                   light cyan on blue:
  762.  
  763.                     QscrollUp (1,1,CRTrows,CRTcols,LightCyan+BlueBG);
  764.  
  765.    ---------------------------------------------------------------------------
  766.    QScrToVscr procedure                                                   Qwik
  767.    ---------------------------------------------------------------------------
  768.    Function       Copies a rows-by-columns block on the current screen to 
  769.                   another location on a virtual screen.
  770.    Declaration    QScrToVscr (Row,Col,Rows,Cols,
  771.  
  772.  
  773.    Chapter 2, Procedures and Functions                                 Page 13
  774.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  775.  
  776.  
  777.                               Vrow,Vcol,Vwidth: byte; VAR VScrPtr);
  778.    Screens        All video pages and virtual screens.
  779.    Remarks        Row, Col, Rows, and Cols locates the block on the current 
  780.                   screen (Scr) as specified by QScrRec.  This block will be 
  781.                   copied to the virtual screen (Vscr) at the location of Vrow 
  782.                   and Vcol.  But since Vscr may have a different column width 
  783.                   than Scr, Vwidth sets the width.  VScrPtr is the base 
  784.                   address of the virtual screen.  By changing QScrRec, you can 
  785.                   even copy blocks from one virtual screen to another!  Only 
  786.                   the Scr side checks for possible snow.
  787.    EOS            Unaltered.
  788.    Restrictions   Stay within the screen limits.  Not intended for copying 
  789.                   between video pages (esp. CGA).
  790.    See also       QVscrToScr
  791.    Example        Copy a 12x40 block from the CRT screen at (5,10) to a 
  792.                   virtual screen at (3,2) and look at the result on the CRT:
  793.  
  794.    uses Qwik;
  795.    const
  796.      VScrRows = 20;     
  797.      VScrCols = 60;
  798.    var
  799.      { Storage size required is: Rows * Cols shl 1 }
  800.      VScr: array[1..VScrRows] of 
  801.            array[1..VScrCols] of word;  { 20 x 60 virtual screen }
  802.      CRTrec,VScrRec: VScrRecType;
  803.    begin
  804.      with VScrRec do             { create specs for virtual screen }
  805.        begin
  806.          Vrows := VScrRows;
  807.          Vcols := VScrCols;
  808.          Vsize := sizeof (VScr);
  809.          Vsnow := false;         { Qwikest when false }
  810.          VEosOfs := 0;
  811.          VScrPtr := @VScr;
  812.        end;
  813.      Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*');    { Fill  CRT  }
  814.      CRTrec  := QScrRec;                      { Save CRT specs     }
  815.      QScrRec := VScrRec;                      { Set virtual specs  }
  816.      Qfill (1,1,VScrRows,VScrCols,Black+BrownBG,'?'); { Fill  VScr }
  817.      QScrRec := CRTrec;                       { Restore CRT specs  }
  818.      QScrToVscr (5,10,12,40,3,2,VScrCols,VScr);       { Copy Block }
  819.      QstoreToScr (1,1,VScrRows,VScrCols,VScr);       { Take a look }
  820.    end.
  821.  
  822.    ---------------------------------------------------------------------------
  823.    QstoreToMem procedure                                                  Qwik
  824.    ---------------------------------------------------------------------------
  825.    Function       Saves a rows-by-columns block from the current screen to 
  826.                   memory.
  827.    Declaration    QstoreToMem (Row,Col,Rows,Cols: byte; VAR Dest);
  828.    Screens        All video pages and virtual screens.
  829.    Remarks        Row, Col, Rows, and Cols locates the block on the current 
  830.                   screen as specified by QScrRec.  This block will be copied 
  831.                   to Dest, the destination, as one long array.  By changing 
  832.  
  833.  
  834.    Chapter 2, Procedures and Functions                                 Page 14
  835.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  836.  
  837.  
  838.                   QScrRec, you can even save blocks from virtual screens!  Be 
  839.                   sure to set Qsnow to false for the fastest speed on virtual 
  840.                   screens.
  841.    EOS            Unaltered.
  842.    Restrictions   Stay within the screen limits.  Not intended for copying 
  843.                   between video pages (esp. CGA).
  844.    See also       QstoreToScr
  845.    Example        Save a 12x40 block from the CRT screen at (5,10), clear the 
  846.                   screen, and restore the block:
  847.  
  848.    uses qwik;
  849.    const
  850.      MemRows = 12;     
  851.      MemCols = 40;
  852.    var
  853.      { Storage size required is: Rows * Cols shl 1 }
  854.      SavedBlock: array[1..MemRows] of 
  855.                  array[1..MemCols] of word;   { 12 x 40 block }
  856.    begin
  857.      Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*');    { Fill CRT    }
  858.      QstoreToMem (5,10,MemRows,MemCols,SavedBlock);   { Save Block  }
  859.      Qfill (1,1,CRTrows,CRTcols,Yellow+BlackBG,' ');  { Clear CRT   }
  860.      QstoreToScr (5,10,MemRows,MemCols,SavedBlock);   { Take a look }
  861.    end.
  862.  
  863.    ---------------------------------------------------------------------------
  864.    QstoreToScr procedure                                                  Qwik
  865.    ---------------------------------------------------------------------------
  866.    Function       Writes a rows-by-columns block to the current screen from 
  867.                   memory.
  868.    Declaration    QstoreToScr (Row,Col,Rows,Cols: byte; VAR Source);
  869.    Screens        All video pages and virtual screens.
  870.    Remarks        Row and Col locates the upper left corner of the block on 
  871.                   the current screen as specified by QScrRec.  A block will be 
  872.                   written from Source, which is one long array, and placed on 
  873.                   the screen as a Rows-by-Cols block.  By changing QScrRec, 
  874.                   you can even place blocks to virtual screens!  Be sure to 
  875.                   set Qsnow to false for the fastest speed on virtual screens.
  876.    EOS            Unaltered.
  877.    Restrictions   Stay within the screen limits.  Not intended for copying 
  878.                   between video pages (esp. CGA).
  879.    See also       QstoreToMem
  880.    Example        Save a 12x40 block from the CRT screen at (5,10) in the 
  881.                   heap, clear the screen, and restore the block:
  882.  
  883.    uses qwik;
  884.    const
  885.      MemRows = 12;     
  886.      MemCols = 40;
  887.    type 
  888.      { Storage size required is: Rows * Cols shl 1 }
  889.      BlockArray = array[1..MemRows] of 
  890.                   array[1..MemCols] of word;   { 12 x 40 block }
  891.    var
  892.      BlockPtr: ^BlockArray;
  893.  
  894.  
  895.    Chapter 2, Procedures and Functions                                 Page 15
  896.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  897.  
  898.  
  899.    begin
  900.      Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*');   { Fill CRT     }
  901.      GetMem (BlockPtr,sizeof(BlockArray));           { Reserve heap } 
  902.      QstoreToMem (5,10,MemRows,MemCols,BlockPtr^);   { Save Block   }
  903.      Qfill (1,1,CRTrows,CRTcols,Yellow+BlackBG,' '); { Clear CRT    }
  904.      QstoreToScr (5,10,MemRows,MemCols,BlockPtr^);   { Take a look  }
  905.      FreeMem (BlockPtr,sizeof(BlockArray));          { Free heap    }
  906.    end.
  907.  
  908.    ---------------------------------------------------------------------------
  909.    QviewPage procedure                                                    Qwik
  910.    ---------------------------------------------------------------------------
  911.    Function       Changes the video page to be viewed on the CRT.
  912.    Declaration    QviewPage (PageNum: byte)
  913.    Screens        All video pages.
  914.    Remarks        Standard TP routines are dedicated only to video page 0.  
  915.                   However, most video cards, except MDA and some 3270 PC, have 
  916.                   more than one video page.  This procedure enables you to 
  917.                   view those pages.  The number of video pages available is 
  918.                   detected by Qinit and saved in MaxPage.  PageNum is 0-based 
  919.                   and the routine will only view other pages when 
  920.                   PageNum<=MaxPage.  VideoPage is the currently viewed page.
  921.    EOS            Unaltered.
  922.    See also       QwritePage, QWIK5X.DOC, QINITEST.PAS
  923.  
  924.    ---------------------------------------------------------------------------
  925.    QVscrToScr procedure                                                   Qwik
  926.    ---------------------------------------------------------------------------
  927.    Function       Copies a rows-by-columns block from a virtual screen to 
  928.                   another location on the current screen.
  929.    Declaration    QVscrToScr (Row,Col,Rows,Cols,
  930.                               Vrow,Vcol,Vwidth: byte; VAR VScrPtr);
  931.    Screens        All video pages and virtual screens.
  932.    Remarks        Row, Col, Rows, and Cols locates the destination on the 
  933.                   current screen (Scr) as specified by QScrRec.  A block will 
  934.                   be copied from the virtual screen (Vscr) at the location of 
  935.                   Vrow and Vcol.  But since Vscr may have a different column 
  936.                   width than Scr, Vwidth sets the width.  VScrPtr is the base 
  937.                   address of the virtual screen.  By changing QScrRec, you can 
  938.                   even copy blocks from one virtual screen to another!  Only 
  939.                   the Scr side checks for possible snow.
  940.    EOS            Unaltered.
  941.    Restrictions   Stay within the screen limits.  Not intended for copying 
  942.                   between video pages (esp. CGA).
  943.    See also       QScrToVscr
  944.    Example        Copy a 12x40 block from the CRT screen at (5,10) to a 
  945.                   virtual screen at (3,2) and look at the result on the CRT:
  946.  
  947.  
  948.    uses Qwik;
  949.    const
  950.      VScrRows = 20;     
  951.      VScrCols = 60;
  952.    var
  953.      { Storage size required is: Rows * Cols shl 1 }
  954.  
  955.  
  956.    Chapter 2, Procedures and Functions                                 Page 16
  957.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  958.  
  959.  
  960.      VScr: array[1..VScrRows] of 
  961.            array[1..VScrCols] of word;  { 20 x 60 virtual screen }
  962.      CRTrec,VScrRec: VScrRecType;
  963.    begin
  964.      with VScrRec do             { create specs for virtual screen }
  965.        begin
  966.          Vrows := VScrRows;
  967.          Vcols := VScrCols;
  968.          Vsize := sizeof (Vscr);
  969.          Vsnow := false;         { Qwikest when false }
  970.          VEosOfs := 0;
  971.          VScrPtr := @VScr;
  972.        end;
  973.      Qfill (1,1,CRTrows,CRTcols,White+BlueBG,'*');    { Fill  CRT  }
  974.      CRTrec  := QScrRec;                      { Save CRT specs     }
  975.      QScrRec := VScrRec;                      { Set virtual specs  }
  976.      Qfill (1,1,VScrRows,VScrCols,Black+BrownBG,'?'); { Fill  VScr }
  977.      QScrRec := CRTrec;                       { Restore CRT specs  }
  978.      QScrToVscr (5,10,12,40,3,2,VScrCols,VScr);       { Copy Block }
  979.      QstoreToScr (1,1,VScrRows,VScrCols,VScr);       { Take a look }
  980.    end.
  981.  
  982.    ---------------------------------------------------------------------------
  983.    Qwrite procedure                                                       Qwik
  984.    ---------------------------------------------------------------------------
  985.    Function       Writes a string to the current screen with an optional 
  986.                   attribute change.
  987.    Declaration    Qwrite (Row,Col: byte; Attr: integer; aStr: string)
  988.    Screens        All video pages and virtual screens.
  989.    Remarks        This routine writes the string aStr at (Row,Col) with the 
  990.                   attribute Attr.  If SameAttr is used for Attr, then the 
  991.                   attribute will remain the same on the screen.
  992.    EOS            Updated.
  993.    Restrictions   Stay within the screen limits.
  994.    See also       QwriteC, QwriteA, QwriteEos, QwriteEosA
  995.    Example        Write the string "Important" at (2,1) with the attribute of 
  996.                   flashing white on red: 
  997.  
  998.                     Qwrite (2,1,Blink+White+RedBG,'Important');
  999.  
  1000.  
  1001.    ---------------------------------------------------------------------------
  1002.    QwriteA procedure                                                      Qwik
  1003.    ---------------------------------------------------------------------------
  1004.    Function       Writes an array (or string) with a specified length to the 
  1005.                   current screen with an optional attribute change.
  1006.    Declaration    QwriteA (Row,Col: byte; Attr: integer; 
  1007.                            ArrayLength: word; VAR aStr)
  1008.    Screens        All video pages and virtual screens.
  1009.    Remarks        This routine writes the array aStr at (Row,Col) with the 
  1010.                   attribute Attr for the number of columns specified by 
  1011.                   ArrayLength.  This enables you to write substrings when 
  1012.                   specifying a starting index (aStr[i]).  (Other routines like 
  1013.                   Qwrite assume the length is the value at aStr[0] and the 
  1014.                   starting index is aStr[1].)  Of course, aStr doesn't have to 
  1015.  
  1016.  
  1017.    Chapter 2, Procedures and Functions                                 Page 17
  1018.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1019.  
  1020.  
  1021.                   be a string - it can be any type variable or address in 
  1022.                   memory.  If SameAttr is used for Attr, then the attribute 
  1023.                   will remain the same on the screen.  
  1024.    EOS            Updated.
  1025.    Restrictions   Stay within the screen limits.
  1026.    See also       Qwrite, QwriteC, QwriteEos, QwriteEosA
  1027.    Example        The following will write "Testing out this line."  with the 
  1028.                   existing screen attributes:
  1029.  
  1030.                      MyString:='Step B: Testing out this line.';
  1031.                      QwriteA (1,1,SameAttr,22,MyString[9]);
  1032.  
  1033.    ---------------------------------------------------------------------------
  1034.    QwriteC procedure                                                      Qwik
  1035.    ---------------------------------------------------------------------------
  1036.    Function       Writes a string to the current screen with an optional 
  1037.                   attribute change and centered between two columns.
  1038.    Declaration    QwriteC (Row,ColL,ColR: byte; Attr: integer;
  1039.                            aStr: string)
  1040.    Screens        All video pages and virtual screens.
  1041.    Remarks        This routine writes the string aStr at (Row,(ColL+ColR-
  1042.                   aStr[0]+1) shr 1) which centers it between the two columns 
  1043.                   ColL and ColR and has the attribute Attr.  If SameAttr is 
  1044.                   used for Attr, then the attribute will remain the same on 
  1045.                   the screen.
  1046.    EOS            Updated.
  1047.    Restrictions   Stay within the screen limits.
  1048.    See also       Qwrite, QwriteA, QwriteEos, QwriteEosA
  1049.    Example        Write a message centered on the screen in row 15 with black 
  1050.                   on green attributes:
  1051.  
  1052.                     QwriteC (15,1,CRTcols,White+GreenBG,'My message'); 
  1053.  
  1054.                   The message will be written in column 36 on an 80 column 
  1055.                   screen.
  1056.  
  1057.    ---------------------------------------------------------------------------
  1058.    QwriteEos procedure                                                    Qwik
  1059.    ---------------------------------------------------------------------------
  1060.    Function       Writes a string to the current screen with an optional 
  1061.                   attribute change starting at the EOS marker.
  1062.    Declaration    QwriteEos (Attr: integer; aStr: string)
  1063.    Screens        All video pages and virtual screens.
  1064.    Remarks        This routine writes the string aStr at the EOS marker with 
  1065.                   the attribute Attr.  If SameAttr is used for Attr, then the 
  1066.                   attribute will remain the same on the screen.
  1067.    EOS            Updated.
  1068.    Restrictions   Stay within the screen limits.
  1069.    See also       Qwrite, QwriteA, QwriteC, QwriteEosA
  1070.    Example        Highlight the number in the following message:
  1071.  
  1072.                     Qwrite    ( 1, 1,White+BlueBG ,'There are');
  1073.                     QwriteEos (      Yellow+BlueBG,' 5 ');
  1074.                     QwriteEos (      White+BlueBG ,'minutes left.');
  1075.  
  1076.  
  1077.  
  1078.    Chapter 2, Procedures and Functions                                 Page 18
  1079.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1080.  
  1081.  
  1082.                   which will write "There are 5 minutes left." as white on 
  1083.                   blue except "5" will be yellow on blue.  
  1084.  
  1085.    ---------------------------------------------------------------------------
  1086.    QwriteEosA procedure                                                   Qwik
  1087.    ---------------------------------------------------------------------------
  1088.    Function       Writes an array (or string) with a specified length to the 
  1089.                   current screen with an optional attribute change starting at 
  1090.                   the EOS marker.
  1091.    Declaration    QwriteEosA (Attr: integer; ArrayLength: word; VAR aStr)
  1092.    Screens        All video pages and virtual screens.
  1093.    Remarks        This routine writes the array aStr at the previously set EOS 
  1094.                   marker with the attribute Attr for the number of columns 
  1095.                   specified by ArrayLength.  This enables you to write 
  1096.                   substrings when specifying a starting index (aStr[i]).  
  1097.                   (Other routines like QwriteEos assume the length is the 
  1098.                   value at aStr[0] and the starting index is aStr[1].)  Of 
  1099.                   course, aStr doesn't have to be a string - it can be any 
  1100.                   type variable or address in memory.  If SameAttr is used for 
  1101.                   Attr, then the attribute will remain the same on the screen.  
  1102.    EOS            Updated.
  1103.    Restrictions   Stay within the screen limits.
  1104.    See also       QwriteA, QwriteC, QwriteEos, QwriteEos
  1105.    Example        The following will write "Testing Step B"  with the existing 
  1106.                   screen attributes:
  1107.  
  1108.                     MyString:='Step B: Testing out this line.';
  1109.                     QwriteA (1,5,SameAttr, 8,MyString[9]);
  1110.                     QwriteEosA ( SameAttr, 6,MyString[1]);
  1111.  
  1112.    ---------------------------------------------------------------------------
  1113.    QwritePage procedure                                                   Qwik
  1114.    ---------------------------------------------------------------------------
  1115.    Function       Changes the video page on which the QWIK routines write.
  1116.    Declaration    QwritePage (PageNum: byte)
  1117.    Screens        All video pages.
  1118.    Remarks        Standard TP routines are dedicated to only video page 0.  
  1119.                   However, most video cards, except MDA and some 3270 PC, have 
  1120.                   more than one video page.  This procedure enables QWIK 
  1121.                   routines to write to those pages by altering QScrOfs and 
  1122.                   QvideoPage which is the current page on which QWIK is 
  1123.                   writing. The number of video pages available is detected by 
  1124.                   Qinit and saved in MaxPage.  The routine will only change 
  1125.                   pages when PageNum<=MaxPage.
  1126.    EOS            Unaltered.
  1127.    See also       QviewPage, QWIK5X.DOC, QINITEST.PAS
  1128.  
  1129.    ---------------------------------------------------------------------------
  1130.    SetCursor procedure                                                    Qwik
  1131.    ---------------------------------------------------------------------------
  1132.    Function       Sets a new cursor mode for the CRT.
  1133.    Declaration    SetCursor (Cursor: word)
  1134.    Screens        Any video page as viewed.
  1135.    Remarks        Using the default cursor variables set by Qinit and/or the 
  1136.                   cursor constants, a new cursor mode can be set by with any 
  1137.  
  1138.  
  1139.    Chapter 2, Procedures and Functions                                 Page 19
  1140.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1141.  
  1142.  
  1143.                   combination of:
  1144.  
  1145.                     CursorInitial       - detected by Qinit at startup
  1146.                     CursorUnderline     - set by Qinit
  1147.                     CursorHalfBlock     - set by Qinit
  1148.                     CursorBlock         - set by Qinit
  1149.                     CursorOff   ($2000) - turns cursor off
  1150.                     CursorBlink ($6000) - erratic blinking (MDA/CGA)
  1151.  
  1152.                   You can simply add them together (logically is best to 
  1153.                   prevent carry errors, but arithmetic is fine).  Although a 
  1154.                   separate cursor location is kept for each video page, there 
  1155.                   is only one cursor mode for the CRT screen.
  1156.    See also       GetCursor, ModCursor
  1157.    Example 1      Set a half-block cursor with erratic blink:
  1158.  
  1159.                     SetCursor (CursorHalfBlock+CursorBlink);
  1160.  
  1161.    Example 2      Set the scan lines for a block cursor, but leave it turned 
  1162.                   off:
  1163.  
  1164.                     SetCursor (CursorBlock+CursorOff);
  1165.  
  1166.    Example 3      Restore the cursor mode at start up and be sure it's turned 
  1167.                   on:
  1168.  
  1169.                     SetCursor (CursorInitial);
  1170.                     ModCursor (CursorOn);
  1171.  
  1172.                   or, for those comfortable with bit operations:
  1173.  
  1174.                     SetCursor (CursorInitial and not CursorBlink);
  1175.  
  1176.  
  1177.    ---------------------------------------------------------------------------
  1178.    StrL function                                                          Strs
  1179.    ---------------------------------------------------------------------------
  1180.    Function       Returns a LongInt converted into a string.
  1181.    Declaration    StrL (L: LongInt)
  1182.    Result type    string
  1183.    Remarks        Uses the standard Str procedure to get result.
  1184.    See also       StrLF, StrR, StrRF, StrRFD
  1185.    Example        The following writes "-12345" on the screen:
  1186.  
  1187.                      { var MyNum: integer; }
  1188.                      MyNum := -12345;
  1189.                      Qwrite ( 1, 1,SameAttr,StrL(MyNum));
  1190.   
  1191.    ---------------------------------------------------------------------------
  1192.    StrLF function                                                         Strs
  1193.    ---------------------------------------------------------------------------
  1194.    Function       Returns a LongInt converted into a string and formatted to 
  1195.                   be right justified in a fixed field.
  1196.    Declaration    StrLF (L: LongInt; Field: integer)
  1197.    Result type    string
  1198.  
  1199.  
  1200.    Chapter 2, Procedures and Functions                                 Page 20
  1201.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1202.  
  1203.  
  1204.    Remarks        Uses the standard Str procedure to get result.
  1205.    See also       StrL, StrR, StrRF, StrRFD
  1206.    Example        The following writes "  -12345" on the screen:
  1207.  
  1208.                      { var MyNum: integer; }
  1209.                      MyNum := -12345;
  1210.                      Qwrite ( 1, 1,SameAttr,StrLF(MyNum,8));
  1211.   
  1212.    ---------------------------------------------------------------------------
  1213.    StrR function                                                          Strs
  1214.    ---------------------------------------------------------------------------
  1215.    Function       Returns a Real converted into a string.
  1216.    Declaration    StrR (R: Real)
  1217.    Result type    string
  1218.    Remarks        Uses the standard Str procedure to get result.
  1219.    See also       StrL, StrLF, StrRF, StrRFD
  1220.    Example        The following writes "-1.2345560000E+04" on the screen:
  1221.  
  1222.                      { var MyNum: real; }
  1223.                      MyNum := -12345.56
  1224.                      Qwrite ( 1, 1,SameAttr,StrR(MyNum));
  1225.   
  1226.    ---------------------------------------------------------------------------
  1227.    StrRF function                                                         Strs
  1228.    ---------------------------------------------------------------------------
  1229.    Function       Returns a Real converted into a string and formatted to 
  1230.                   be right justified in a fixed field.
  1231.    Declaration    StrRF (R: Real; Field: integer)
  1232.    Result type    string
  1233.    Remarks        Uses the standard Str procedure to get result.
  1234.    See also       StrL, StrLF, StrR, StrRFD
  1235.    Example        The following writes "-1.2346E+04" on the screen:
  1236.  
  1237.                      { var MyNum: real; }
  1238.                      MyNum := -12345.56
  1239.                      Qwrite ( 1, 1,SameAttr,StrRF(MyNum,11));
  1240.   
  1241.    ---------------------------------------------------------------------------
  1242.    StrRFD function                                                        Strs
  1243.    ---------------------------------------------------------------------------
  1244.    Function       Returns a Real converted into a string and formatted to 
  1245.                   be right justified in a fixed field with a fixed number of 
  1246.                   numbers to the right of the decimal.
  1247.    Declaration    StrRFD (R: Real; Field,Decimal: integer)
  1248.    Result type    string
  1249.    Remarks        Uses the standard Str procedure to get result.
  1250.    See also       StrL, StrLF, StrR, StrRF
  1251.    Example        The following writes "  -12345.6" on the screen:
  1252.  
  1253.                      { var MyNum: real; }
  1254.                      MyNum := -12345.56
  1255.                      Qwrite ( 1, 1,SameAttr,StrRFD(MyNum,10,1));
  1256.   
  1257.  
  1258.  
  1259.  
  1260.  
  1261.    Chapter 2, Procedures and Functions                                 Page 21
  1262.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1263.  
  1264.  
  1265.    ---------------------------------------------------------------------------
  1266.    WhereC function                                                        Qwik
  1267.    ---------------------------------------------------------------------------
  1268.    Function       Returns the absolute column of the cursor on the currently 
  1269.                   written video page.
  1270.    Declaration    WhereC
  1271.    Result type    byte
  1272.    Screens        All video pages only.
  1273.    Remarks        Operates on the currently written video page.  The upper 
  1274.                   left corner of the screen (1,1). 
  1275.    See also       GotoRC, WhereR
  1276.  
  1277.    ---------------------------------------------------------------------------
  1278.    WhereR function                                                        Qwik
  1279.    ---------------------------------------------------------------------------
  1280.    Function       Returns the absolute row of the cursor on the currently 
  1281.                   written video page.
  1282.    Declaration    WhereR
  1283.    Result type    byte
  1284.    Screens        All video pages only.
  1285.    Remarks        Operates on the currently written video page.  The upper 
  1286.                   left corner of the screen (1,1). 
  1287.    See also       GotoRC, WhereC
  1288.    ---------------------------------------------------------------------------
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.    Chapter 2, Procedures and Functions                                 Page 22
  1323.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1324.  
  1325.  
  1326.    3.  V A R I A B L E S
  1327.  
  1328.    The variables in QWIK.TPU are initialized according to the the kind of 
  1329.    system, display(s), and video adapter(s) that Qinit detects.  QWIK uses 
  1330.    them for reference and they may also be used in your own programming to 
  1331.    help make decisions.
  1332.  
  1333.  
  1334.    SYSTEM HARDWARE
  1335.  
  1336.    System Hardware Variables - These variables indicate the kind of computer 
  1337.    that Qinit detected:
  1338.  
  1339.      Variable      Description
  1340.      ------------  -----------------------------------------------------------
  1341.      CpuID         (Type: Byte) Intel CPU identification code.  CpuID can be 
  1342.                    any one of the following four constants:
  1343.  
  1344.                      Cpu8086  - Intel 8086/8088     
  1345.                      Cpu80186 - Intel 80186/80188   
  1346.                      Cpu80286 - Intel 80286         
  1347.                      Cpu80386 - Intel 80386         
  1348.  
  1349.      SystemID      (Type: Byte) Code for the IBM computer in use and is set by 
  1350.                    Qinit.  See SubModelID for values.
  1351.  
  1352.      SubModelID    (Type: Byte) Code for the sub-model of the IBM computer in 
  1353.                    use.  This value defaults to 0 the first time Qinit is run.  
  1354.                    To get a value, execute GetSubModelID.
  1355.  
  1356.                      SysID Sub-Model SYSTEM
  1357.                      ----- --------- ------------------------------
  1358.                      $FF     n/a     IBM PC
  1359.                      $FE     n/a     IBM PC XT
  1360.                      $FD     n/a     IBM PCjr
  1361.                      $FC     n/a     IBM PC AT (6 MHz, 01/10/84)
  1362.                              $00     IBM PC AT (6 MHz, 06/10/85)
  1363.                              $01     IBM PC AT (8 MHz, 11/15/85)
  1364.                              $02     IBM PC XT (286)
  1365.                              $04     IBM PS/2 model 50
  1366.                              $05     IBM PS/2 model 60
  1367.                      $FB     $00     IBM PC XT (256/640)
  1368.                      $FA     $00     IBM PS/2 model 30
  1369.                              $01     IBM PS/2 model 25
  1370.                      $F9     $00     IBM PC Convertible
  1371.                      $F8     $00     IBM PS/2 model 80 (16 MHz)
  1372.                              $04     IBM PS/2 model 80 (20 MHz)
  1373.                              $09     IBM PS/2 model 70 (16 MHz)
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.    Chapter 3, Variables                                                Page 23
  1384.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1385.  
  1386.  
  1387.    VIDEO HARDWARE
  1388.  
  1389.    Video Hardware Variables - These variables indicate the kind of video 
  1390.    card(s) and display(s) that Qinit detected:
  1391.  
  1392.      Variable      Description
  1393.      ------------- ----------------------------------------------------------
  1394.      ActiveDispDev (Type: Byte) Code for the Active Display Device.  Using 
  1395.                    IBM's Display Combination Code (DCC), Qinit detects the 
  1396.                    video adapter combined with the video display.  The codes 
  1397.                    have been set to the following constants.  Note that 
  1398.                    monochrome is odd and color is even:
  1399.  
  1400.                      Constant    Code  Description
  1401.                      ----------- ----- --------------------------------
  1402.                      NoDisplay   $00   No display
  1403.                      MdaMono     $01   MDA with 5151 monochrome display
  1404.                      CgaColor    $02   CGA with 5153/4 color display
  1405.                      DCC3        $03   reserved
  1406.                      EgaColor    $04   EGA with 5153/4 color
  1407.                      EgaMono     $05   EGA with 5151 monochrome
  1408.                      PgcColor    $06   PGC with 5175 color
  1409.                      VgaMono     $07   VGA with analog monochrome
  1410.                      VgaColor    $08   VGA with analog color
  1411.                      DCC9        $09   reserved
  1412.                      DCC10       $0A   reserved
  1413.                      McgaMono    $0B   MCGA with analog monochrome
  1414.                      McgaColor   $0C   MCGA with analog color
  1415.                      n/a         $0D to $FE - reserved
  1416.                      Unknown     $FF   unknown device
  1417.  
  1418.      ActiveDispDev3270 (Type: Byte) Code for the Active Display Device on the 
  1419.                    3270 PC.  Only the $FF code corresponds to the constant 
  1420.                    "Unknown".
  1421.  
  1422.                      Code  Monitor       Adapter
  1423.                      ----  ------------  ---------------------
  1424.                      $00   5151 or 5272  for 5151 or 5272
  1425.                      $01   3295          for 3295
  1426.                      $02   5151 or 5272  for 5151 or 5272 plus
  1427.                                           XGA graphics
  1428.                      $03   5279          3270 PC G
  1429.                      $04   5379 C01      3270 PC GX
  1430.                      $05   5379 M01      3270 PC GX
  1431.                      $06   reserved
  1432.                      $07   reserved
  1433.                      $FF   Unknown, not a 3270 PC
  1434.  
  1435.      AltDispDev    (Type: Byte) Code for the Alternate Display Device.  This 
  1436.                    code is detected by Qinit for a second, but inactive 
  1437.                    adapter and display, just in case there are dual monitors.  
  1438.                    It uses the same constants as ActiveDispDev listed above.
  1439.  
  1440.      AltDispDevPCC (Type: Word) Code for the Alternate Display adapter on the 
  1441.                    PC Convertible.  In hex, it corresponds to the model number 
  1442.  
  1443.  
  1444.    Chapter 3, Variables                                                Page 24
  1445.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1446.  
  1447.  
  1448.                    of the attached device:
  1449.  
  1450.                      Model  Description
  1451.                      -----  --------------------
  1452.                      $   0  No alternate adapter
  1453.                      $5140  LCD
  1454.                      $5153  CGA type
  1455.                      $5151  Monochrome type
  1456.  
  1457.      CardSeg       (Type: Word) Video segment address of the video "card" as 
  1458.                    detected by Qinit.
  1459.  
  1460.      CardSnow      (Type: Boolean) Set to true for wait-for-retrace for the 
  1461.                    video "card" as detected by Qinit.
  1462.  
  1463.      EgaInfo       (Type: Byte) Absolute variable at $0040:$0087 has the 
  1464.                    following information when the EGA (or VGA) is present:
  1465.  
  1466.                      Bits  Description
  1467.                      ----  -------------------------------------------
  1468.                      7     (0) Clear, (1) Keep video data after
  1469.                            video mode set
  1470.                      6,5   (00) 64k, (01), 128k, (10) 192k, (11) 256k,
  1471.                            memory on the card.
  1472.                      4     Reserved
  1473.                      3     (0) EGA active, (1) EGA not active
  1474.                      2     (0) Disable,    (1) Enable wait-for-display
  1475.                      1     (0) CD/ECD      (1) MD attached
  1476.                      0     (0) Active,     (1) Inactive CD emulation
  1477.  
  1478.      EgaSwitches   (Type: Byte) By checking the value of this byte, you can 
  1479.                    determine the monitor connected to the EGA, the alternate 
  1480.                    video system, and the start up default.  The byte is a copy 
  1481.                    of how the dip switches are set on the card where on=0 and 
  1482.                    off=1.  The primary is the default.  When the ECD is set 
  1483.                    for 640x200, it is emulating the CD including the cursor 
  1484.                    mode.  Qinit directly tests for the alternate device rather 
  1485.                    than assuming it.
  1486.  
  1487.                      Switch    Primary             Secondary
  1488.                      --------  ------------------- -------------------
  1489.                      0000 = 0  MDA + MD            EGA + CD - 40x25
  1490.                      0001 = 1  MDA + MD            EGA + CD - 80x25
  1491.                      0010 = 2  MDA + MD            EGA + ECD (640x200)
  1492.                      0011 = 3  MDA + MD            EGA + ECD (640x350)
  1493.                      0100 = 4  CGA + CD - 40x25    EGA + MD
  1494.                      0101 = 5  CGA + CD - 80x25    EGA + MD
  1495.                      0110 = 6  EGA + CD - 40x25    MDA + MD
  1496.                      0111 = 7  EGA + CD - 80x25    MDA + MD
  1497.                      1000 = 8  EGA + ECD (640x200) MDA + MD 
  1498.                      1001 = 9  EGA + ECD (640x350) MDA + MD 
  1499.                      1010 =10  EGA + MD            CGA + CD - 40x25
  1500.                      1011 =11  EGA + MD            CGA + CD - 80x25
  1501.  
  1502.      Have3270      (Type: Boolean) If Qinit detects 3270 PC equipment or 
  1503.  
  1504.  
  1505.    Chapter 3, Variables                                                Page 25
  1506.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1507.  
  1508.  
  1509.                    software, this variable is set to true.  In addition, the 
  1510.                    ActiveDispDev is either MdaMono or CgaColor.  Note that 
  1511.                    there may or may not be graphics capability in either case; 
  1512.                    Qinit is not meant to detect graphics.  See 
  1513.                    ActiveDispDev3270 for codes.
  1514.  
  1515.      HavePS2       (Type: Boolean) Qinit sets HavePS2 to true if the DCC is 
  1516.                    supported.  This means that the program has detected a PS/2 
  1517.                    video card whether it is integrated on a model 30, a PS/2 
  1518.                    Display Adapter installed on an IBM XT, or the like.  It 
  1519.                    also means that either MCGA or VGA is present, but not 
  1520.                    necessarily active.  To know which, just check the DCC.
  1521.  
  1522.      HercModel     (Type: Byte) Model of the attached Hercules video card.  If 
  1523.                    no card is detected, then HercModel=NoHerc.
  1524.  
  1525.                      Constant    Code  Description
  1526.                      ----------  ----  ---------------------
  1527.                      NoHerc       0    No Hercules card
  1528.                      HgcMono      1    HGC
  1529.                      HgcPlus      2    HGC Plus
  1530.                      HercInColor  3    Hercules InColor Card
  1531.  
  1532.      MaxPage       (Type: Byte) Maximum possible 0-based video page number.  
  1533.                    See TABLE 1 in QWIK5X.DOC for ranges.
  1534.  
  1535.  
  1536.    VIDEO SOFTWARE
  1537.  
  1538.    Video Software Variables - These variables indicate the current video mode 
  1539.    and screen characteristics to which QWIK is writing and what is being 
  1540.    viewed on the CRT.  There are several absolute variables listed that 
  1541.    duplicate some of the global variables like CRTcolumns and CRTcols.  It is 
  1542.    preferable to use the global ones, where the absolute ones are only needed 
  1543.    for handling exceptions.
  1544.  
  1545.      Variable      Description
  1546.      ------------  -----------------------------------------------------------
  1547.      CRTcols       (Type: Byte) Global variable equal to CRTcolumns.
  1548.  
  1549.      CRTcolumns    (Type: Word) Absolute variable directly accesses the 1-
  1550.                    based currently viewed number of CRT columns for any card 
  1551.                    or video mode.
  1552.  
  1553.      CRTrows       (Type: Byte) 1-based number of CRT rows for any card or 
  1554.                    video mode.
  1555.  
  1556.      EgaFontSize   (Type: Word) Absolute variable directly accesses the 1-
  1557.                    based number of horizontal scan lines per character for 
  1558.                    EGA/MCGA/VGA.
  1559.  
  1560.      EgaRows       (Type: Byte) Absolute variable directly accesses the 0-
  1561.                    based number of rows on the current screen for EGA, MCGA, 
  1562.                    and VGA.  This number is used to make CRTrows which is 
  1563.                    handled by Qinit.
  1564.  
  1565.  
  1566.    Chapter 3, Variables                                                Page 26
  1567.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1568.  
  1569.  
  1570.  
  1571.      Page0seg      (Type: Word) Segment for the base page, page 0.  In multi-
  1572.                    tasking environments, change this value to its video 
  1573.                    display buffer.  QScrSeg and QScrOfs should also be set.
  1574.  
  1575.      QEosOfs       (Type: Word) 0-base offset where a Q*Eos procedure will 
  1576.                    write.
  1577.  
  1578.      QScrSeg       (Type: Word) Segment for QWIK writing which is altered when 
  1579.                    changing pages.  QScrSeg=Page0seg on page 0.
  1580.  
  1581.      QScrOfs       (Type: Word) Offset for QWIK writing needed for virtual 
  1582.                    screens.  The usual value is 0 for the video pages.
  1583.  
  1584.      QScrPtr       (Type: Pointer) Combines QScrSeg and QScrOfs
  1585.  
  1586.      QScrRec       (Type: VScrRecType) Record of essential variables for QWIK 
  1587.                    screen writing.  This variable occupies the same space and 
  1588.                    in the same order of:
  1589.  
  1590.                      Global    QScrRec
  1591.                      -------   -------
  1592.                      CRTrows   Vrows
  1593.                      CRTcols   Vcols
  1594.                      CRTsize   Vsize
  1595.                      Qsnow     Vsnow
  1596.                      QEosOfs   VEosOfs
  1597.                      QScrPtr   VScrPtr
  1598.  
  1599.                    These variables are also described in this section.  As a 
  1600.                    record, the variables can be swapped easily when writing to 
  1601.                    virtual screens.  See the example in QVscrToScr procedure.
  1602.  
  1603.      Qsnow         (Type: Boolean) Set to true for wait-for-retrace (snow) 
  1604.                    while QWIK is writing.
  1605.  
  1606.      QvideoPage    (Type: Byte) Video page to which QWIK is writing which is 
  1607.                    set by QwritePage.  It is initially 0.
  1608.  
  1609.      QvideoMode    (Type: Byte) Video mode detected by Qinit.
  1610.  
  1611.      ScrollAttr    (Type: Integer) The attribute used to clear the blank row 
  1612.                    when QEosLn is used.
  1613.  
  1614.      VideoMode     (Type: Byte) Absolute variable directly accesses the 
  1615.                    current video mode in low memory.
  1616.  
  1617.      VideoPage     (Type: Byte) Absolute variable directly accesses the 
  1618.                    currently viewed video page in low memory.
  1619.  
  1620.      VScrRecType   The type for the record of essential variables for QWIK 
  1621.                    screen writing to virtual screens.  This enables an easy 
  1622.                    exchange of data between the CRT and virtual screens.
  1623.  
  1624.  
  1625.  
  1626.  
  1627.    Chapter 3, Variables                                                Page 27
  1628.    QWIK Screen Utilities                         Reference Guide, Version 5.x
  1629.  
  1630.  
  1631.    VIDEO CURSOR
  1632.  
  1633.    Video Cursor Variables and Constants - These variables and constants give 
  1634.    you easy tools to combine with bit operations to display your choice of 
  1635.    cursor modes.  The variables default with the cursor on and no skew which 
  1636.    are detected and set by Qinit at startup:
  1637.  
  1638.      Variable          Description
  1639.      ----------------- --------------------------------------------------------
  1640.      CursorBlock       (Type: Word) Cursor mode value for the full cell.
  1641.  
  1642.      CursorHalfblock   (Type: Word) Cursor mode value for a half block usually 
  1643.                        used for insert editing.
  1644.  
  1645.      CursorInitial     (Type: Word) Cursor mode value detected at startup.
  1646.  
  1647.      CursorUnderline   (Type: Word) Cursor mode value for the normal 
  1648.                        underline.
  1649.  
  1650.  
  1651.      Constant     Value  Description
  1652.      -----------  -----  -----------------------------------------------------
  1653.      CursorBlink  $6000  Used to alter bits 13/14 to create erratic blinking 
  1654.                          on MDA/CGA cards.  (EGA/VGA cards turn the cursor 
  1655.                          off.)
  1656.  
  1657.      CursorOff    $2000  Used to alter bits 13/14 or can be used by itself to 
  1658.                          turn the cursor off.
  1659.  
  1660.      CursorOn     $0000  Used to alter bits 13/14 in ModeCursor to turn the 
  1661.                          cursor back on.
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.    Chapter 3, Variables                                                Page 28
  1689.